在前一篇接 USB複製 ISO檔看到的速度有疑惑,來找一些磁碟效能測試工具實測看看。
過去已有認知,有不同情境下的效能指標:
先把範圍定在試試幾個 Linux 下的磁碟效能測試工具,
簡略測測看這台小主機的 SSD、USB 讀寫效能。
看看手上消費級產品的效能。
Proxmox 就這樣先被當 Linux主機玩
起手先安裝
apt-get install hdparm
先看 hdparm -h
注意到測讀取為主,其它功能見 manpage
-t
Perform device read timings-T
Perform cache read timings--direct
不用掛載磁碟,接上後即可測 (可在 dmesg -T
看到是否有偵測到)
~# hdparm -tT /dev/nvme0n1
/dev/nvme0n1:
Timing cached reads: 19640 MB in 2.00 seconds = 9832.56 MB/sec
Timing buffered disk reads: 4312 MB in 3.00 seconds = 1437.17 MB/sec
~# hdparm -tT --direct /dev/nvme0n1
/dev/nvme0n1:
Timing O_DIRECT cached reads: 2858 MB in 2.00 seconds = 1429.07 MB/sec
Timing O_DIRECT disk reads: 4474 MB in 3.00 seconds = 1490.89 MB/sec
~# hdparm -tT /dev/sda
/dev/sda:
Timing cached reads: 19250 MB in 2.00 seconds = 9637.01 MB/sec
Timing buffered disk reads: 1590 MB in 3.00 seconds = 529.71 MB/sec
~# hdparm -tT --direct /dev/sda
/dev/sda:
Timing O_DIRECT cached reads: 962 MB in 2.00 seconds = 480.85 MB/sec
Timing O_DIRECT disk reads: 1458 MB in 3.00 seconds = 485.55 MB/sec
~# hdparm -tT /dev/sdb
/dev/sdb:
Timing cached reads: 19438 MB in 2.00 seconds = 9732.02 MB/sec
Timing buffered disk reads: 310 MB in 3.02 seconds = 102.68 MB/sec
~# hdparm -tT --direct /dev/sdb
/dev/sdb:
Timing O_DIRECT cached reads: 204 MB in 2.02 seconds = 101.05 MB/sec
Timing O_DIRECT disk reads: 304 MB in 3.02 seconds = 100.79 MB/sec
~# hdparm -tT /dev/sdb
/dev/sdb:
Timing cached reads: 18248 MB in 2.00 seconds = 9134.54 MB/sec
Timing buffered disk reads: 126 MB in 3.01 seconds = 41.93 MB/sec
~# hdparm -tT --direct /dev/sdb
/dev/sdb:
Timing O_DIRECT cached reads: 80 MB in 2.04 seconds = 39.17 MB/sec
Timing O_DIRECT disk reads: 120 MB in 3.00 seconds = 39.99 MB/sec
--direct
時, Timing cached reads
數字都漂亮到誇張…有個有點妙的 -H
,
-H
Read temperature from drive (Hitachi only)~ $ hdparm -H /dev/sdb
/dev/sdb:
drive temperature (celsius) is: 35
drive temperature in range: yes
不同家的讀不到正常數據
~ $ hdparm -H /dev/sda
/dev/sda:
SG_IO: bad/missing sense data, sb[]: 70 00 0b 00 00 00 00 0a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
drive temperature (celsius) is: under -20
drive temperature in range: yes
看硬碟資訊的
-i
Display drive identification
-I
Detailed/current information directly from drive
M2 SSD 另外要裝 nvme-cli
。 nvme smart-log /dev/nvme0n1
歪樓不在效能測試的主題,又有點零散,先這樣。
另外
https://www.alexleo.click/io_bench_how_to/
https://www.akitio.com.tw/view-article/186-usb-3-0